@extends('plugin.layout.base')
@section('add_css')

@endsection
@section('content')
    <div class="layui-card">
        <div class="layui-tab layui-tab-brief">

            <div class="layui-tab-content">

                <div class="layui-tab-item layui-show">
                    @include('plugin.'.$controller_base_lower.'.form')
                    @include('plugin.layout.table')
                </div>
            </div>
        </div>
    </div>
@endsection
@section('foot_js')
    @include('plugin.layout.ListConfig')
    <script>

        layui.use(['index', 'listTable'], function () {
            var $ = layui.$
                , listTable = layui.listTable;
            cols = [[
                {type: 'checkbox'}
                , {field: 'id', width: 80, title: 'ID', sort: true}
                , {field: 'item_key', width: 180, title: '字段'}
                , {
                    field: 'checked', width: 100, title: '状态', templet: function (d) {
                        return layui_switch('checked', d, '启用|禁用')
                    }
                }
                , {title: '操作', minWidth: 180, align: 'center', toolbar: '#tpl-create-edit'}
            ]]
            //渲染
            listTable.render(listConfig.index_url, cols);
            //监听搜索
            listTable.search();
        });
    </script>
@endsection
